package com.youlu.campus.admin.annotation;

/**
 * @author : [dengbo]
 * @className : AuthParamTypeEnum
 * @description : [认证参数类型]
 * @createTime : [2022/6/30 10:24]
 */
public enum AuthParamTypeEnum {
    DEFAULT("活动","activityId"),
    TASK("活动任务", "taskId"),
    TASK_RULE("活动任务规则", "taskRuleId"),
    PAY_CONFIG("支付配置", "payConfigId"),
    PAY_BUTTON("支付按钮", "payButtonId"),
    QA("题库", "qaId"),
    QA_RULE("题库规则", "qaRuleId"),

    ;
    private final String name;
    private final String type;

    AuthParamTypeEnum(String name, String type) {
        this.name = name;
        this.type = type;
    }

    public static String getName(String type) {
        for (AuthParamTypeEnum c : AuthParamTypeEnum.values()) {
            if (c.getType() == type) {
                return c.name;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public String getType() {
        return type;
    }

}
